<%@ include file="../tagJSONLibIncludes.jsp" %>
{
   title:'<fmt:message key="classInst.title.modify"/>',
   form:{actionUrl: '${auth}/classInst/${classDefType}/${selectedClassDefId}/modify',
         formName: 'classInst',
         enctype:'multipart/form-data',
         fields:[
         {name:"layout", type:"group", title:"<fmt:message key="classInst.title.modify"/> {${classInstUID}}"},
         <c:set var="indexProperties" value="0"/>
         <c:forEach var="property" items="${propertyDefs}" varStatus="status">
            <c:if test="${property.property.isHidden == false}">
            <c:choose>
                <c:when test="${property.property.propertyType == 3 }">
                {name:"propertyValues[${indexProperties}].value", value:"${fn:formatShortDate(property.value, sessionScope["OCM.timezoneOffset"])}", label:"${property.property.displayName}", type:"${property.property.propertyType}"},
                </c:when>
                <c:otherwise>
                {name:"propertyValues[${indexProperties}].value", value:${fn:parseJsonString(property.value)}, label:"${property.property.displayName}", type:"${property.property.propertyType}"},
                </c:otherwise>
            </c:choose>
            {name:"propertyValues[${indexProperties}].property.name", label:"", type:"hidden", value:"${property.property.name}"},
            {name:"propertyValues[${indexProperties}].property.id", label:"", type:"hidden", value:"${property.property.id}"},
            <c:set var="indexProperties" value="${indexProperties + 1}"/>
            </c:if>
         </c:forEach>
         <c:if test="${classDefType == 0}">
         {name:"layout", type:"group", title:""},
         {name:"fileData", type:"singleFile", label:"File"}
         </c:if>
         ],
         buttons:[{name:"btnCancel", label:"<fmt:message key="btn.cancel"/>", type:"button"},
                  {name:"btnReset", label:"<fmt:message key="btn.reset"/>", type:"reset"},
                  {name:"btnAdd", label:"<fmt:message key="btn.update"/>", type:"button"}]
        }
}